package vistop.datatypes;

import java.util.ArrayList;
import java.util.List;

public class Volume extends GeometricalObject {
	private List<Directed<Face>> faces;
	
	public Volume(int id) {
		super(id);
		this.faces = new ArrayList<Directed<Face>>();
	}
	
	public Volume (int id, List<Directed<Face>> faces) {
		super(id);
		this.faces = faces;
	}
		
	public List<Directed<Face>> getFaces() {
		return this.faces;
	}
	
	public void addFace(Face f, int direction) {
		Directed<Face> df = new Directed<Face>(f, direction);
		faces.add(df);
	}
	
	@Override
	public String toString() {
		String str = "Volume ID="+ super.getId()+"\n";
		for (Directed<Face> df : faces) { 
			str += "####" + df.getDirection() + "*\n" + 
					df.getGeometricalObject().toString() + "\n";
		}
		return str + "volume ID=" + super.getId()+" END";
	}
}
